package org.vshe.improve.spring.prospring3;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("META-INF/spring/app-context.xml");
		context.registerShutdownHook();
		
		Service service = context.getBean("staticService", DefaultService.class);
		System.out.println(service.getMessage());
		
		
		
		context.stop();

	}

}
